#ifndef __DS1302_H__
#define __DS1302_H__

//--包含头文件--//
#include <Reg51.h>
#include <intrins.h>
#include "SPI.h"
#include "delay.h"

#define BURST_WRITE 0xBE
#define BURST_READ 0xBF

//声明全局变量--//
extern unsigned char time[8]; //全局变量

void DS1302Write(unsigned char addr, unsigned char dat);
unsigned char DS1302Read(unsigned char addr);
void DS1302Init();
void DS1302ReadTimer();
void DS1302BurstWrite();
void DS1302BurstRead(unsigned char *buf);
void DS1302BurstInit();

#endif